CRPEJob::GetGroupCondition
Use CRPEJob::GetGroupCondition to determine the group condition information for a selected group section in the specified report. Use this method to find out the group condition for a group section. Use CRPEJob::SetGroupCondition, to change the group condition once it is known.
Syntax
BOOL GetGroupCondition (
short sectionCode,
CString &conditionField,
short *condition,
short *sortDirection );
Parameters
sectionCode
| Specifies the code for the report section for which you want to get the grouping condition. Use one of the following constants.
|
| Constant
| Description
|
| PEP_GROUPHEADER
| Sets the group condition for the Group Header section.
|
| PEP_GROUPFOOTER
| Sets the group condition for the Group Footer section.
|
conditionField
| Reference to the name of the group summary field for which you want to get the grouping condition.
|
condition
| Specifies a pointer to the type of field being used as the condition field and the condition that creates a new group. Use one of the following masks to separate the condition type from the group condition:
|
| Constant
| Description
|
| PEP_GC_CONDITIONMASK
| Obtains the group condition value. Use the bitwise AND (&) to combine this mask with the value of the condition parameter to obtain the group condition value.
|
| PEP_GC_TYPEMASK
| Obtains the type of field used for the group condition. Use the bitwise AND (&) to combine this mask with the value of the condition parameter to obtain a value representing the type of field used by the group condition.
|
For group condition field types other than Date and Boolean, the group condition value of the condition parameter is PEP_GC_ANYCHANGE. For a group condition field of the type Date or type DateTime, the group condition value will be one of the following constants.
Constant
| Description
|
PEP_GC_DAILY
| Triggers a grouping every time the date changes.
|
PEP_GC_WEEKLY
| Triggers a grouping every time the date changes from one week to the next (a week runs from Sunday through Saturday).
|
PEP_GC_BIWEEKLY
| Triggers a grouping every time the date changes from one two-week period to the next.
|
PEP_GC_SEMIMONTHLY
| Triggers a grouping every time the date changes from one half-month period to the next.
|
PEP_GC_MONTHLY
| Triggers a grouping every time the date changes from one month to the next.
|
PEP_GC_QUARTERLY
| Triggers a grouping every time the date changes from one calendar quarter to the next.
|
PEP_GC_SEMIANNUALLY
| Triggers a grouping every time the date changes from one half-year period to the next.
|
PEP_GC_ANNUALLY
| Triggers a grouping every time the date changes from one year to the next.
|
For a group condition field of type Time or DateTime, the group condition value will be one of the following constants.
Constant
| Description
|
PEP_GC_BYSECOND
| Triggers a grouping every second.
|
PEP_GC_BYMINUTE
| Triggers a grouping every minute.
|
PEP_GC_BYHOUR
| Triggers a grouping every hour.
|
PEP_GC_BYAMPM
| Triggers a grouping at 0000 and 1200 hours.
|
For a group condition field of the type Boolean, the group condition value will be one of the following constants.
Constant
| Description
|
PEP_GC_TOYES
| Triggers a grouping every time the sort-and-group-by field changes from No to Yes.
|
PEP_GC_TONO
| Triggers a grouping every time the sort-and-group-by field changes from Yes to No.
|
PEP_GC_EVERYYES
| Triggers a grouping every time the sort-and-group-by field value is Yes.
|
PEP_GC_EVERYNO
| Triggers a grouping every time the sort-and-group-by field value is No.
|
PEP_GC_NEXTISYES
| Triggers a grouping every time the next value in the sort-and-group-by field is Yes.
|
PEP_GC_NEXTISNO
| Triggers a grouping every time the next value in the sort-and-group-by field is No.
|
The group condition field type portion of the condition parameter uses the following constants.
| Constant
| Description
|
| PEP_GC_TYPEOTHER
| Any field type other than Date or Boolean. The group condition portion of the condition parameter will be PEP_GC_ANYCHANGE.
|
| PEP_GC_TYPEDATE
| A Date field is used to create the group summary field.
|
| PEP_GC_TYPEBOOLEAN
| A Boolean field is used to create the group summary field.
|
| PEP_GC_TYPETIME
| A Time field is used to create the group summary field.
|
sortDirection
| Specifies a pointer to the sort direction for the group summary field. Use one of the PEP_SF_XXX Sort Order Constants.
|
Returns
- TRUE if the call is successful.
- FALSE if the call fails.